home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / misc / IOBlixDevKitR4.lha / IOBlixDevKit / C / include / ioblix / ioblixtool.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-05  |  2.0 KB  |  78 lines

  1. #ifndef IOBLIX_TOOLLIB_H
  2. #define IOBLIX_TOOLLIB_H 1
  3.  
  4. #include <exec/types.h>
  5. #include <exec/ports.h>
  6. #include <devices/timer.h>
  7.  
  8. /* useful functions for MsgPorts and Signals */
  9. BOOL AllocPort( struct MsgPort *port );
  10. void FreePort( struct MsgPort *port );
  11. BYTE AllocSig( BYTE instead );
  12. void FreeSig ( BYTE sig );
  13.  
  14. /* useful functions for timerequests */
  15. void TimerDelay( struct timerequest *treq,
  16.                  ULONG secs,
  17.                  ULONG mics );
  18. void StartTimer( struct timerequest *treq,
  19.                  ULONG secs,
  20.                  ULONG mics );
  21.  
  22. /* useful functions for UARTs */
  23. void uart_init( struct IOBlixChipNode *icn,
  24.                 struct SerialPrefs *prefs,
  25.                 BOOL test );
  26. void uart_deinit( struct IOBlixChipNode *icn );
  27.  
  28.  
  29. /* useful functions for Ethernet chip */
  30. void smc_reset( struct EthernetRegisters *ec,
  31.                 UWORD ephEnable );
  32. void smc_enable( struct EthernetRegisters *ec,
  33.                  BOOL noFullDuplex,
  34.                  BOOL loop);
  35. void smc_shutdown( struct EthernetRegisters *ec );
  36. void smc_get_mac_address( struct EthernetRegisters *ec,
  37.                           UBYTE *addrBuf );
  38. void smc_set_mac_address( struct EthernetRegisters *ec,
  39.                           UBYTE *addrBuf );
  40.  
  41. /* little-endian <-> big-endian conversions */
  42. UWORD i2m_word( UWORD d );
  43. ULONG i2m_long( ULONG d );
  44.  
  45. /* 64bit math functions */
  46. struct Integer64 {
  47.     ULONG i64_Upper;
  48.     ULONG i64_Lower;
  49. };
  50.  
  51. /* dst += src */
  52. void ASM add64 ( REG(a0) struct Integer64 *dst,
  53.                  REG(a1) struct Integer64 *src );
  54.  
  55. /* dst -= src */
  56. void ASM sub64 ( REG(a0) struct Integer64 *dst,
  57.                  REG(a1) struct Integer64 *src );
  58.  
  59. /*
  60.     dst < src       -1
  61.     dst = src        0
  62.     dst > src        1
  63. */
  64. int ASM cmp64 ( REG(a0) struct Integer64 *dst,
  65.                 REG(a1) struct Integer64 *src );
  66.  
  67. /* useful functions for strings */
  68. void _sprintf( UBYTE *buffer,
  69.                UBYTE *fmt,... );
  70.  
  71. void ErrorMsg( UBYTE *msg,
  72.                UBYTE *device,
  73.                ULONG unitNum, ... );
  74.  
  75. #endif
  76.  
  77.  
  78.